From 3ca795d447868aaa03af5c4cf669b6f5271c309c Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Mon, 30 Jan 2012 14:05:16 -0500 Subject: [PATCH] entry: don't blindly center the text area in the allocated height Since top/bottom borders might be different. --- gtk/gtkentry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 4f0d909998..f094fd2b97 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -3228,7 +3228,7 @@ gtk_entry_get_text_area_size (GtkEntry *entry, *x = borders.left; if (y) - *y = frame_height / 2 - (req_height - borders.top - borders.bottom) / 2; + *y = floor ((frame_height - req_height) / 2) + borders.top; if (width) *width = allocation.width - borders.left - borders.right; -- 2.30.2